﻿<UserControl x:Class="TouchCafe.Views.CheckoutView"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      Background="Black"
      Style="{Binding StaticResource MetroUserControl}">
    <!--<UserControl.Resources>
        <Style x:Key="SimpleListBoxItem" TargetType="ListBoxItem">
            <Setter Property="FocusVisualStyle" Value="{x:Null}" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListBoxItem">
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="true">
                                <Setter Property="Background"
                                    Value="Transparent"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>-->
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>
        <ItemsControl ItemsSource="{Binding Items}" Background="Transparent" BorderBrush="Transparent" >
            <ItemsControl.ItemTemplate>
                <DataTemplate >
                    <Grid Grid.Row="0" Margin="0,16,0,16">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0" Source="{Binding Image}" Width="100"/>
                        <TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="24" Foreground="{DynamicResource MetroText}" VerticalAlignment="Center"/>
                        <TextBlock Grid.Column="2" Text="{Binding Price}" FontSize="24" Foreground="{DynamicResource MetroText}" VerticalAlignment="Center"/>
                    </Grid>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
        <Grid Grid.Row="1" Margin="0,16,0,16">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="1" Text="Total:" FontSize="24" FontWeight="Bold" Foreground="{DynamicResource MetroText}"/>
            <TextBlock Grid.Column="2" Text="{Binding Total}" FontSize="24" Foreground="{DynamicResource MetroText}"/>
        </Grid>
        <Button Grid.Row="3" Content="Submit" FontSize="24" Height="72" Command="{Binding SubmitCommand}"/>
    </Grid>
</UserControl>
